<?php
use League\Plates\Extension\ExtensionInterface;
include_once __DIR__ .'/../utils/Router.php';

class Asset implements ExtensionInterface{
	private $dir;
	public function __construct($dir){
		$this->dir = $dir.'/';
	}
	public function getFunctions(){
		return array(
				'asset' => 'getAsset'
		);
	}
	public function getAsset($asset){
		$assetPath = $this->dir . $asset;
		$assetPath = str_replace(ROOT, '', $assetPath);
		return HTTPNAME .$assetPath;
	}
}